import request from '@/utils/request'

// u账户
// 查询u账户列表
export function getUAccountList(query) {
  return request({
    url: '/md/exchangeUCoin/list',
    method: 'get',
    params: query
  })
}

// 查询U账户详细
export function UAccountDetail(coinId) {
  return request({
    url: '/md/exchangeUCoin/' + coinId,
    method: 'get'
  })
}

// 新增U账户
export function addUAccount(data) {
  return request({
    url: '/md/exchangeUCoin',
    method: 'post',
    data: data
  })
}

// 修改U账户
export function updateUAccount(data) {
  return request({
    url: '/md/exchangeUCoin',
    method: 'put',
    data: data
  })
}

// 删除U账户
export function delUAccount(coinId) {
  return request({
    url: '/md/exchangeUCoin/' + coinId,
    method: 'delete'
  })
}

// 修改U账户状态
export function changeUAccountStatus(data) {
  return request({
    url: '/md/exchangeUCoin/updateStatus',
    method: 'put',
    data: data
  })
}

// tg账户
// 查询tg账户列表
export function getTGAccountList(query) {
  return request({
    url: '/md/telegram/list',
    method: 'get',
    params: query
  })
}

// 查询tg账户详细
export function TGAccountDetail(robotId) {
  return request({
    url: '/md/telegram/' + robotId,
    method: 'get'
  })
}

// 新增tg账户
export function addTGAccount(data) {
  return request({
    url: '/md/telegram',
    method: 'post',
    data: data
  })
}

// 修改tg账户
export function updateTGAccount(data) {
  return request({
    url: '/md/telegram',
    method: 'put',
    data: data
  })
}

// 删除tg账户
export function delTGAccount(robotId) {
  return request({
    url: '/md/telegram/' + robotId,
    method: 'delete'
  })
}

// 修改tg账户状态
export function changeTGAccountStatus(data) {
  return request({
    url: '/md/telegram/updateStatus',
    method: 'put',
    data: data
  })
}